home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / winword / macros.txt < prev    next >
Text File  |  1992-10-11  |  1KB  |  53 lines

  1. Macros for Word
  2. Following is a description of 2 trivial
  3.  but useful macros for Word:
  4.  
  5. 1.  These two macros will change the font size to 2/3 of
  6.  your normal font size when you switch to superscript or subscript.
  7.  They will, of course, change it back to your original font size when
  8.  you turn superscript/subscript off.
  9.  
  10.  Subscript macro:
  11. --------------------  cut here  -------------
  12. Sub MAIN
  13. If SuperScript() = 0 Then
  14.     FontSize FontSize() * 2 / 3
  15. Else
  16.     FontSize FontSize() * 3 / 2
  17. EndIf
  18. SuperScript
  19. End Sub
  20. --------------------  cut here  -------------
  21. Superscript Macro:
  22.  
  23.  
  24. --------------------  cut here  -------------
  25. Sub MAIN
  26. If SubScript() = 0 Then
  27.     FontSize FontSize() * 2 / 3
  28. Else
  29.     FontSize FontSize() * 3 / 2
  30. EndIf
  31. SubScript
  32. End Sub
  33. --------------------  cut here  -------------
  34.  
  35. 2. This macro will start equation editor MAXIMIZED.
  36. --------------------  cut here  -------------
  37. Sub MAIN
  38. InsertObject .Class = "Equation"
  39. key$ = "% x"
  40. SendKeys key$
  41. End Sub
  42. --------------------  cut here  -------------
  43. To use these macros, choose Tools-Macro. Type a name for the macro,
  44.  and choose Edit. copy the macro text and File-Save. You can then 
  45. assign them to a keyboard shortcut, a menu item or a button. 
  46.  
  47. Disclaimer: They work for me. No guarantees are provided. 
  48. Use at your own risk.
  49.  
  50. Ido Bar-Tana
  51. bartana@boulder.colorado.edu
  52.  
  53.